package avicit.bdp.dgs.standard.vo;

import avicit.bdp.dgs.standard.dto.DataElementHistoryDto;

import java.util.Objects;

public class DataElementHistoryDIffDetail {

  /** 数据元版本 */
  private boolean dataElementVersion;

  /** 所属分类 */
  private boolean typeId;

  /** 标准编码 */
  private boolean code;

  /** 中文名称 */
  private boolean name;

  private boolean enName;

  /** 状态 */
  private boolean status;

  /** 数据类型 */
  private boolean dataType;

  /** 标准类型 */
  private boolean standardType;

  /** 标准来源 */
  private boolean standardFrom;

  /** 业务含义 */
  private boolean businessMeaning;

  /** 长度 */
  private boolean length;

  /** 精度 */
  private boolean decimalPrecision;

  /** 是否引用数据字典 */
  private boolean quoteLookupTable;

  /** 引用数据字典主键 */
  private boolean lookupTableId;

  /** 是否非空 */
  private boolean notNull;

  /** 是否唯一 */
  private boolean uniqueKey;

  public DataElementHistoryDIffDetail() {}

  public DataElementHistoryDIffDetail(
      DataElementHistoryDto currentVersionInfo, DataElementHistoryDto targetVersionInfo) {

    Objects.requireNonNull(currentVersionInfo);
    Objects.requireNonNull(currentVersionInfo);

    setDataElementVersion(Objects.equals(currentVersionInfo.getCode(), targetVersionInfo.getCode()));
    setTypeId(Objects.equals(currentVersionInfo.getTypeId(), targetVersionInfo.getTypeId()));
    setCode(Objects.equals(currentVersionInfo.getCode(), targetVersionInfo.getCode()));
    setName(Objects.equals(currentVersionInfo.getName(), targetVersionInfo.getName()));
    setEnName(Objects.equals(currentVersionInfo.getEnName(), targetVersionInfo.getEnName()));
    setStatus(Objects.equals(currentVersionInfo.getStatus(), targetVersionInfo.getStatus()));
    setDataType(Objects.equals(currentVersionInfo.getDataType(), targetVersionInfo.getDataType()));
    setStandardType(Objects.equals(currentVersionInfo.getStandardType(), targetVersionInfo.getStandardType()));
    setStandardFrom(Objects.equals(currentVersionInfo.getStandardFrom(), targetVersionInfo.getStandardFrom()));
    setBusinessMeaning(Objects.equals(currentVersionInfo.getBusinessMeaning(), targetVersionInfo.getBusinessMeaning()));
    setLength(Objects.equals(currentVersionInfo.getLength(), targetVersionInfo.getLength()));
    setDecimalPrecision(Objects.equals(currentVersionInfo.getDecimalPrecision(), targetVersionInfo.getDecimalPrecision()));
    setQuoteLookupTable(Objects.equals(currentVersionInfo.getQuoteLookupTable(), targetVersionInfo.getQuoteLookupTable()));
    setLookupTableId(Objects.equals(currentVersionInfo.getLookupTableId(), targetVersionInfo.getLookupTableId()));
    setNotNull(Objects.equals(currentVersionInfo.getNotNull(), targetVersionInfo.getNotNull()));
    setUniqueKey(Objects.equals(currentVersionInfo.getUniqueKey(), targetVersionInfo.getUniqueKey()));
  }

  public boolean isDataElementVersion() {
    return dataElementVersion;
  }

  public void setDataElementVersion(boolean dataElementVersion) {
    this.dataElementVersion = dataElementVersion;
  }

  public boolean isTypeId() {
    return typeId;
  }

  public void setTypeId(boolean typeId) {
    this.typeId = typeId;
  }

  public boolean isCode() {
    return code;
  }

  public void setCode(boolean code) {
    this.code = code;
  }

  public boolean isName() {
    return name;
  }

  public void setName(boolean name) {
    this.name = name;
  }

  public boolean isEnName() {
    return enName;
  }

  public void setEnName(boolean enName) {
    this.enName = enName;
  }

  public boolean isStatus() {
    return status;
  }

  public void setStatus(boolean status) {
    this.status = status;
  }

  public boolean isDataType() {
    return dataType;
  }

  public void setDataType(boolean dataType) {
    this.dataType = dataType;
  }

  public boolean isStandardType() {
    return standardType;
  }

  public void setStandardType(boolean standardType) {
    this.standardType = standardType;
  }

  public boolean isStandardFrom() {
    return standardFrom;
  }

  public void setStandardFrom(boolean standardFrom) {
    this.standardFrom = standardFrom;
  }

  public boolean isBusinessMeaning() {
    return businessMeaning;
  }

  public void setBusinessMeaning(boolean businessMeaning) {
    this.businessMeaning = businessMeaning;
  }

  public boolean isLength() {
    return length;
  }

  public void setLength(boolean length) {
    this.length = length;
  }

  public boolean isDecimalPrecision() {
    return decimalPrecision;
  }

  public void setDecimalPrecision(boolean decimalPrecision) {
    this.decimalPrecision = decimalPrecision;
  }

  public boolean isQuoteLookupTable() {
    return quoteLookupTable;
  }

  public void setQuoteLookupTable(boolean quoteLookupTable) {
    this.quoteLookupTable = quoteLookupTable;
  }

  public boolean isLookupTableId() {
    return lookupTableId;
  }

  public void setLookupTableId(boolean lookupTableId) {
    this.lookupTableId = lookupTableId;
  }

  public boolean isNotNull() {
    return notNull;
  }

  public void setNotNull(boolean notNull) {
    this.notNull = notNull;
  }

  public boolean isUniqueKey() {
    return uniqueKey;
  }

  public void setUniqueKey(boolean uniqueKey) {
    this.uniqueKey = uniqueKey;
  }
}
